/**
 * @file wa_label.h
 *
 */

#ifndef _WA_LABEL_H
#define _WA_LABEL_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
*      INCLUDES
*********************/
#include "wa_conf.h"
#if USE_WA_LABEL != 0
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "wa_area.h"
#include "wa_obj.h"
#include "wa_mask_draw.h"
#include "wa_wm.h"
#include "wa_font.h"
#include "wa_image.h"	
#include "wa_malloc.h"
/*********************
*      DEFINES
*********************/

#define WA_LABEL_AL_LEFT         (0<<0)
#define WA_LABEL_AL_RIGHT        (1<<0)
#define WA_LABEL_AL_HCENTER      (2<<0)

#define WA_LABEL_AL_TOP          (0<<2)
#define WA_LABEL_AL_BOTTOM       (1<<2)
#define WA_LABEL_AL_VCENTER      (2<<2)

/**********************
*      TYPEDEFS
**********************/

typedef struct
{
	char* text;
	uint8_t row_space;
	uint8_t col_space;
	wa_font* font;
	wa_gui_color text_color;
	wa_gui_color back_color;
	uint8_t align_mode;
}wa_label_ext;

/**********************
* GLOBAL PROTOTYPES
**********************/
void wa_label_module_init(void);
wa_obj* wa_label_create(wa_obj* par);
void wa_label_set_text(wa_obj* label, char* text);
void wa_label_set_row_space(wa_obj* label, uint8_t row_space);
void wa_label_set_col_space(wa_obj* label, uint8_t col_space);
void wa_label_set_font(wa_obj* label, wa_font* font);
void wa_label_set_text_color(wa_obj* label, wa_gui_color color);
void wa_label_set_back_color(wa_obj* label, wa_gui_color color);
void wa_label_set_align_mode(wa_obj* label, uint8_t align_mode);
int32_t wa_label_get_text(wa_obj* label, char* text, uint32_t size);
uint8_t wa_label_get_row_space(wa_obj* label);
uint8_t wa_label_get_col_space(wa_obj* label);
wa_font* wa_label_get_font(wa_obj* label);
wa_gui_color wa_label_get_text_color(wa_obj* label);
wa_gui_color wa_label_get_back_color(wa_obj* label);
uint8_t wa_label_get_align_mode(wa_obj* label);

/**********************
*      MACROS
**********************/

#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
